//
//  Contact.m
//  04-集合2
//
//  Created by 曹曹 on 16/7/7.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "Contact.h"

@implementation Contact
- (instancetype)initWithName:(NSString *)name
                 phoneNumber:(NSString *)phoneNumber {
    self = [super init];
    if (self ) {
        // 初始化方法中不要使用set方法给属性赋值
        _name = name;
        _phoneNumber = phoneNumber;
    }
    return self;
}
- (NSString *)description {
    return [NSString stringWithFormat:@"name = %@, age = %ld, gender = %@, phoneNumber = %@, address = %@, groupName = %@", _name, _age, _gender, _phoneNumber, _address, _groupName];
}
- (void)showContact {
    NSLog(@"%@", self);
}
@end
